package cn.jmz.micpro.jpa;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.NoRepositoryBean;

import java.util.Optional;

/**
 * cn.jmz.micpro.jpa.repository
 *
 * @author JMZ
 * @date 2021/12/16 16:22
 */
@NoRepositoryBean
public interface BaseRepository<T,ID> extends JpaRepository<T, ID> {

    Optional<T> findById(ID id);

    <S extends T> S save(S entity);

    void deleteById(ID id);

}
